/****************************************************
	文件：GameLauncher.cs
	作者：世界和平
	日期：2021/3/11 18:18:41
	功能：Nothing
*****************************************************/

using System;
using System.Collections;
using UnityEngine;
using Rosiness;
using Rosiness.Event;
using UnityEngine.SceneManagement;

public class GameLauncher : MonoBehaviour
{
    // Start is called before the first frame update
    void Awake()
    {
        RosinessEngine.Initialize(this, null);
    }

    private void Start()
    {
        RosinessLog.Log("Rosiness Start...");
        StartCoroutine(CreateGameModules());
    }

    private IEnumerator CreateGameModules()
    {
        RosinessEngine.CreateModule<EventManager>();
        // 创建游戏业务逻辑相关的自定义模块
        RosinessEngine.CreateModule<InsAdEvaluate>();
        yield return new WaitForSeconds(0.1f);
        SceneManager.LoadScene(1);
    }
}